package myDesiign.com.song.beans;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @Author Klys
 * @Date 2023/6/18 22:44
 * @Description
 * @Version 1.0
 */
@Component
public class MyBean {

    @Autowired
    private Abean abean;

    @Resource
    private Rbean rbean;

    private String userName;

    private String pwd;

    @Override
    public String toString() {
        return "MyBean{" +
                "abean=" + abean +
                ", rbean=" + rbean +
                ", userName='" + userName + '\'' +
                ", pwd='" + pwd + '\'' +
                '}';
    }

    public String test() {
//        abean.setaName("我设置的bean!");
        return abean.getaName();
    }
}
